import { Args, Mutation, Query, Resolver } from '@nestjs/graphql';
import { RegisterUserInputDto } from './dto/register.user.dto';

@Resolver()
export class UserResolver {
  @Query(() => String)
  hello(): string {
    return 'hello';
  }

  @Mutation(() => String, { nullable: false, description: '测试用户注册' })
  async register(
    @Args('data') registerUserInputDto: RegisterUserInputDto,
  ): Promise<string> {
    console.log('提交的数据 ,,,', RegisterUserInputDto);
    return Promise.resolve('注册成功');
  }
}
